<?php
/*******************************************************************************
 * $Date:: Jan 10, 2011 10:47:17 PM                                            $
 * $Revision:                                                                  $
 * $Author:: Tuan Duong                                                        $
 * $Comment::                                                                  $
 ******************************************************************************/ 
/**
 * Description here...
 * 
 * @package Lua
 * @subpackage Util
 * @author Tuan Duong <bacduong[at]gmail[dot]com>
 * @version 
 */

class Lua_Util_Session
{
    /**
     * @return Lua_Bean_IpooUser
     */
    public static function getLoggedUser()
    {
        $user = new Lua_Bean_IpooUser();
        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity()) {
            $storage = $auth->getStorage()->read();
            $user->id = $storage->id;
            $user->username = $storage->username;             
            $user->full_name = $storage->full_name;             
            $user->email = $storage->email;             
        }    
        return $user;             
    }
}